import { Injectable } from '@angular/core';
import { Subject, Observable } from 'rxjs';

@Injectable({
  providedIn: 'root'
})
export class NavService {

  private sub: Subject<string> = new Subject();

  constructor() { }

  public navLabelObs(): Observable<string> {
    return this.sub.asObservable();
  }

  public navLabel(label: string): void {
    return this.sub.next(label);
  }

}
